package com.xingmang.common.utils;

import cn.dev33.satoken.stp.StpUtil;
import com.xingmang.common.constant.CommonProperties;
import com.xingmang.common.vo.admin.LoginUserVO;

/**
 * @auther: hansom
 * @Version: 1.0
 * @create 2023/4/18 13:11
 */
public class TokenUtils {
    public static Long getUserId(){
        return Long.valueOf((String) StpUtil.getLoginId());
    }

    public static LoginUserVO getLoginUser() {
        return (LoginUserVO)StpUtil.getSession().get(CommonProperties.LOGIN_USER_KEY);
    }
}
